package cn.tedu.oop;
/**本类用于测试面向对象综合案例*/
public class TestOop {
    public static void main(String[] args) {
        Teacher t1=new CGBTeacher() ;
        Teacher t2=new ACTTeacher();
        t1.teach();
        t2.teach();
    }
}
abstract class Teacher{
    private String name;
    private int age;
    private double salary;
    private String gender;

    public abstract void ready();
    public abstract void teach();

    public Teacher() {
        System.out.println("无参构造");
    }

    public Teacher(String name, int age, double salary, String gender) {
        System.out.println("全参构造");
        this.name = name;
        this.age = age;
        this.salary = salary;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
class CGBTeacher extends Teacher{
    @Override
    public void ready() {
        System.out.println();
    }

    @Override
    public void teach(){
        System.out.println("正在讲课电商项目");
    }
}
class ACTTeacher extends Teacher{
    @Override
    public void ready(){
        System.out.println("正在备课框架加强");
    }

    @Override
    public void teach() {

    }
}
